var t = require("../../../@babel/runtime/helpers/objectSpread2"), a = getApp();

Page({
    data: {
        overlayShow: !1,
        allDataList: {},
        order_id: "",
        inShow: !1,
        newBlindBoxData: {},
        info: !1
    },
    onShow: function() {
        this.setData({
            info: !0
        });
    },
    onHide: function() {
        this.setData({
            info: !1
        });
    },
    onLoad: function(t) {
        this.setData({
            order_id: t.order_id
        }), this.getData();
    },
    getData: function() {
        var e = this;
        a._postNetWork({
            url: a.getNetAddresss("plugin.new-blind-box.frontend.activity.open-box-page"),
            data: {
                order_id: this.data.order_id
            },
            success: function(a) {
                var o = a.data;
                if (o.result) {
                    var i = t({
                        list: [ t(t({}, o.data.activity), {}, {
                            goods: o.data.goods
                        }) ]
                    }, o.data);
                    e.setData({
                        allDataList: i,
                        inShow: !0
                    });
                } else wx.showToast({
                    icon: "none",
                    title: o.msg,
                    duration: 1500
                }), wx.navigateTo({
                    url: "/packageA/member/myOrder_v2/myOrder_v2?status=0&orderType=newBindBox&title=我的盲盒"
                });
            },
            fail: function(t) {
                console.log(t);
            }
        });
    },
    clickUnpack: function() {
        var t = {
            api: "plugin.new-blind-box.frontend.activity.open-box",
            order_id: this.data.order_id
        };
        this.setData({
            newBlindBoxData: t,
            overlayShow: !0
        });
    },
    issueGoodsClose: function(t) {
        this.setData({
            overlayShow: !1
        });
    }
});